package com.ossjk.oa.system.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.ossjk.core.base.entity.BaseEntity;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 * 部门表
 * </p>
 *
 * @author chair
 * @since 2019-01-30
 */
public class Department extends BaseEntity<Department> {

    private static final long serialVersionUID = 1L;
    @ApiModelProperty(name = "id", dataType = "String", value = "部门id")
    @TableId("id")
    private String id;
    /**
     * 父id
     */
    @ApiModelProperty(name = "pid", dataType = "String", value = "父id")
    @TableField("pid")
    private String pid;
    /**
     * 名称
     */
    @ApiModelProperty(name = "name", dataType = "String", value = "部门名称")
    @TableField("name")
    private String name;
    /**
     * 等级
     */
    @ApiModelProperty(name = "level", dataType = "String", value = "等级")
    @TableField("level")
    private BigDecimal level;
    /**
     * 排序
     */
    @ApiModelProperty(name = "sort", dataType = "String", value = "排序")
    @TableField("sort")
    private BigDecimal sort;
    /**
     * 备注
     */
    @ApiModelProperty(name = "remarks", dataType = "String", value = "备注")
    @TableField("remarks")
    private String remarks;
    /**
     * 上班时间
     */
    @ApiModelProperty(name = "bgtm", dataType = "String", value = "上班时间")
    @TableField("bgtm")
    @JSONField(format = "HH:mm")
    private Date bgtm;
    /**
     * 下班时间
     */
    @ApiModelProperty(name = "edtm", dataType = "String", value = "下班时间")
    @TableField("edtm")
    @JSONField(format = "HH:mm")
    private Date edtm;


    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getPid() {
        return pid;
    }

    public void setPid(String pid) {
        this.pid = pid;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public BigDecimal getLevel() {
        return level;
    }

    public void setLevel(BigDecimal level) {
        this.level = level;
    }

    public BigDecimal getSort() {
        return sort;
    }

    public void setSort(BigDecimal sort) {
        this.sort = sort;
    }

    public String getRemarks() {
        return remarks;
    }

    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }

    public Date getBgtm() {
        return bgtm;
    }

    public void setBgtm(Date bgtm) {
        this.bgtm = bgtm;
    }

    public Date getEdtm() {
        return edtm;
    }

    public void setEdtm(Date edtm) {
        this.edtm = edtm;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "Department{" +
        ", id=" + id +
        ", pid=" + pid +
        ", name=" + name +
        ", level=" + level +
        ", sort=" + sort +
        ", remarks=" + remarks +
        ", bgtm=" + bgtm +
        ", edtm=" + edtm +
        "}";
    }
}
